<?php

$installer = $this;

$installer->startSetup();

$installer->run("

-- DROP TABLE IF EXISTS {$this->getTable('colorswatch')};
CREATE TABLE {$this->getTable('colorswatch')} (
  `colorswatch_id` int(11) unsigned NOT NULL auto_increment,
  `attribute_id` int(11) NOT NULL,
  `content` text NOT NULL default '',
  `created_time` datetime NULL,
  `update_time` datetime NULL,
  PRIMARY KEY (`colorswatch_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE {$this->getTable('colorswatch_images')} (
  `colorswatch_images_id` int(11) unsigned NOT NULL auto_increment,
  `product_id` int(11) NOT NULL,
  `attribute_id` int(11) NOT NULL,
  `option_id` int(11) NOT NULL,
  `file` text NOT NULL default '',
  `created_time` datetime NULL,
  `update_time` datetime NULL,
  PRIMARY KEY (`colorswatch_images_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    ");

$installer->endSetup(); 